<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name='viewport' content='width=device-width, initial-scale=1.0'>
  <title>OpenLayers - 背景</title>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.28.0/components/prism-core.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.28.0/plugins/autoloader/prism-autoloader.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.28.0/plugins/toolbar/prism-toolbar.min.js"></script>
  <script
    src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.28.0/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js"></script>
  <link rel="stylesheet" type="text/css"
    href="https://fonts.googleapis.com/css?family=Quattrocento+Sans:400,400italic,700" crossorigin="anonymous">
  <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css"
    crossorigin="anonymous">
  <link rel="stylesheet" type="text/css"
    href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.2/css/fontawesome.min.css"
    crossorigin="anonymous">
  <link rel="stylesheet" type="text/css"
    href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.2/css/solid.css" crossorigin="anonymous">
  <link rel="stylesheet" type="text/css"
    href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.2/css/brands.css" crossorigin="anonymous">
  <link rel="stylesheet" type="text/css" href="/theme/ol.css">
  <link rel="stylesheet" type="text/css" href="/theme/site.css">
  <link rel="icon" type="image/svg+xml" href="/theme/img/logo-light.svg" media="(prefers-color-scheme: light)" />
  <link rel="icon" type="image/svg+xml" href="/theme/img/logo-dark.svg" media="(prefers-color-scheme: dark)" />
</head>

<body>
  <header class="navbar navbar-expand-md navbar-dark mb-3 px-3 py-0 fixed-top" role="navigation">
    <a class="navbar-brand" href="/"><img src="/theme/img/logo-dark.svg" width="70" height="70"
        alt="">&nbsp;OpenLayers</a>
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#olmenu"
      aria-controls="olmenu" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>

    <!-- menu items that get hidden below 768px width -->
    <nav class="collapse navbar-collapse" id="olmenu">
      <ul class="nav navbar-nav ms-auto">
        <li class="nav-item dropdown">
          <a class="nav-link dropdown-toggle" href="#" id="docdropdown" role="button" data-bs-toggle="dropdown"
            aria-haspopup="true" aria-expanded="false">Docs</a>
          <div class="dropdown-menu dropdown-menu-end mb-3" aria-labelledby="docdropdown">
            <a class="dropdown-item" href="/doc/">Docs</a>
            <div class="dropdown-divider"></div>
            <a class="dropdown-item" href="/doc/quickstart.html"><i class="fa fa-check fa-fw me-2 fa-lg"></i>快速入门</a>
            <a class="dropdown-item" href="/doc/faq.html"><i class="fa fa-question fa-fw me-2 fa-lg"></i>常见问题</a>
            <a class="dropdown-item" href="/doc/tutorials/"><i class="fa fa-book fa-fw me-2 fa-lg"></i>教程</a>

          </div>
        </li>
        <li class="nav-item"><a class="nav-link" href="/en/latest/examples/">Examples</a></li>
        <li class="nav-item dropdown">
          <a class="nav-link dropdown-toggle" href="#" id="apidropdown" role="button" data-bs-toggle="dropdown"
            aria-haspopup="true" aria-expanded="false">
            <i class="fa fa-sitemap me-1"></i>API
          </a>
          <div class="dropdown-menu dropdown-menu-end mb-3" aria-labelledby="apidropdown">
            <a class="dropdown-item" href="/en/latest/apidoc/"><i class="fa fa-sitemap fa-fw me-2 fa-lg"></i>v8.2.0
              (latest)</a </div>
        </li>
      </ul>
    </nav>
  </header>

  <div class="container">
    <h1 id="background">背景</h1>
    <h2 id="overview">概述</h2>
    <p>OpenLayers 是一个模块化、高性能、功能丰富的库，用于显示地图和地理空间数据并与之交互。</p>
    <p>该库内置了对各种商业和免费图像和矢量图块源的支持，以及最流行的开放和专有矢量数据格式。借助 OpenLayers 的地图投影支持，数据可以位于任何投影中。</p>
    <h2 id="public-api">公共 API</h2>
    <p>OpenLayers以 npm 包的形式 <a href="https://npmjs.com/package/ol"><code>ol</code>提供</a>, 它提供了官方支持的API的所有模块。</p>
    <h2 id="browser-support">浏览器支持</h2>
    <p>OpenLayers可在所有现代浏览器上运行(全球使用率超过 1%)。这包括 Chrome、Firefox、Safari 和 Edge。对于较旧的浏览器，可能需要添加<a
        href="https://polyfill.io/">polyfills</a>。</p>
    <p>该库适用于台式机/笔记本电脑和移动设备，并支持指针和触摸交互。</p>
    <h2 id="module-and-naming-conventions">模块和命名约定</h2>
    <p>OpenLayers对于具有 CamelCase 名称的模块提供类作为默认导出，并且可能包含其他常量或函数作为命名导出：</p>
    <pre><code class="language-js">import Map from &#39;ol/Map.js&#39;;
import View from &#39;ol/View.js&#39;;
</code></pre>
    <p>在包的子文件夹中提供了按其父级分组的类层次结构，例如<code>layer/</code>。
    </p>
    <p>为了方便起见，这些也可以作为命名导出使用，例如</p>
    <pre><code class="language-js">import {Map, View} from &#39;ol&#39;;
import {Tile, Vector} from &#39;ol/layer.js&#39;;
</code></pre>
    <p>除了这些重新导出的类之外，具有小写名称的模块还提供常量或函数作为命名导出：</p>
    <pre><code class="language-js">import {getUid} from &#39;ol&#39;;
import {fromLonLat} from &#39;ol/proj.js&#39;;
</code></pre>

  </div>

  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js"></script>
</body>

</html>